import React, { useEffect, useState } from 'react';
import Item from '../components/index';
import axios from 'axios'
const Index = () => {
    const [News,setNews] = useState([]);
    const fetchData = async()=>{
        var res = await axios.get("http://122.112.161.135:4000/api/movie/comingSoon")
        setNews(
            res.data.res
        )
    }
    useEffect(()=>{
        fetchData()
    },[])
    return (
        <div>
            <Item data={News}></Item>
        </div>
    );
}

export default Index;

